(function () {
    let myChart = echarts.init(document.querySelector('.box-m1'))
    let option = {
        title: {
            text: '直营占比'
        },
        graphic: [
            {
                type: 'text',
                top: '45%',
                left: '46%',
                style: {
               
                    fill: '#fff',
                    color: '#fff',
                    fontSize: 24,
                    fontWeight: 'bold'
                }
            }, {
                type: 'text',
                top: '52%',
                left: '46.5%',
                style: {
                    text: '占比54%',
                    fill: '#A6A8B6',
                    fontSize: 12,
                    fontWeight: 'normal'
                }
            },
        ],
        series: [
            {
                type: 'pie',
                //   radius: '50%',
                radius: [40, 50],
                label: {
                    show: false
                },
                startAngle: 200,
                data: [
                    {
                        value: 30,
                        itemStyle: {
                            color: '#333843'
                        }
                    },
                    {
                        value: 90,
                        itemStyle: {
                            color: '#6abaf2'
                        }
                    },
                ]
            }
        ]
    };

    myChart.setOption(option)
    window.addEventListener('resize', () => {
        myChart.resize()
    })
})()